Open
Conversation
|
Sider has detected 1 error and 2 warnings on analyzing the commit 3d2a545.
If the errors persist even after retrying, the following actions may resolve them:
If you still have problems, feel free to ask us via chat. 💬 You can turn off such notifications if unnecessary. |
yuyasat
reviewed
Jun 21, 2021
challengeA/okamoto/lib/plan.rb
Outdated
| JSON.load(File.open(json_file_path)) | ||
| end | ||
|
|
||
| def available?(plan) |
Contributor
There was a problem hiding this comment.
この行以下のメソッドですが、planを引数に持つメソッドとなっています。
この辺りから、より良いクラス設計が考えられるのではないかと感じました。もしお時間があれば考えてみてください・・!
Author
There was a problem hiding this comment.
@yuyasat
コメントありがとうございます。
おっしゃるとおり、すべてにplanを引数に持つということはplanのインスタンスを作る設計とした方が良さそうだと気付きました。
PlansクラスとPlanクラスへ分離してみましたので再度ご確認いただけると幸いです。
Plansクラス
- dataを読み込み、Planへデータを渡す
- Planインスタンスの配列を作る
Planクラス
- Planインスタンスを作成
- planの探索や必要な要素を抽出
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
担当者様
challengeAの課題を提出させていただきます。
ご確認よろしくお願いします。
クラス設計
Simulatorクラス
Plansクラス
Planクラス
テスト観点
工夫した点